/**
* 版权声明：厦门睿商网络科技有限公司 版权所有 违者必究
* 日    期：2020-07-26
*/
package com.rzico.order.entity;

import com.rzico.annotation.IgnoreSwaggerParameter;
import com.rzico.basics.entity.Member;
import com.rzico.basics.entity.Shop;
import lombok.Data;
import java.util.Date;
import javax.persistence.*;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * <pre>
 *   空桶记录表数据库对象
 * </pre>
 * @author Rzico Boot
 * @version 1.0
 */
@Data
@JsonIgnoreProperties(value = {"handler"})
@JsonInclude(JsonInclude.Include.NON_NULL)
@Table(name = "wx_empty_barrel")
public class EmptyBarrel {

    @Id
    @ApiModelProperty(value = "" )
    protected Long id;

    @ApiModelProperty(value = "创建日期" )
    protected java.util.Date createDate;

    @ApiModelProperty(value = "修改日期" )
    protected java.util.Date modifyDate;

    @ApiModelProperty(value = "所属企业" )
    protected Long enterpriseId;

    @ApiModelProperty(value = "买方会员" )
    protected Long memberId;

    @ApiModelProperty(value = "商品名称" )
    protected String name;

    @ApiModelProperty(value = "备注" )
    protected String memo;

    @ApiModelProperty(value = "结算成本价" )
    protected java.math.BigDecimal cost;

    @ApiModelProperty(value = "数量" )
    protected java.math.BigDecimal quantity;

    @ApiModelProperty(value = "商品编号" )
    protected String sn;

    @ApiModelProperty(value = "商品规格" )
    protected String spec;

    @ApiModelProperty(value = "单位" )
    protected String unit;

//    @ApiModelProperty(value = "物流费用(所有)" )
//    protected java.math.BigDecimal shippingFreight;
//
//    @ApiModelProperty(value = "送货工资(含楼层费)" )
//    protected java.math.BigDecimal adminFreight;
//
//    @ApiModelProperty(value = "楼层费" )
//    protected java.math.BigDecimal levelFreight;

    @ApiModelProperty(value = "商品规格" )
    protected String thumbnail;

    @ApiModelProperty(value = "商品规格" )
    protected Long productId;

    @ApiModelProperty(value = "记录类型(0.入库,1.销售,2.退桶,3.出库)" )
    protected Integer emptyType;

    @ApiModelProperty(value = "是否核销(0.待审,1.已审)" )
    protected Integer audited;

    @ApiModelProperty(value = "订单" )
    protected Long orderId;

    @ApiModelProperty(value = "订单号" )
    protected String orderSn;

    @ApiModelProperty(value = "送货单" )
    protected Long shippingId;

    @ApiModelProperty(value = "退货单" )
    protected Long returnId;

    @ApiModelProperty(value = "门店ID")
    protected Long shopId;

    @ApiModelProperty(value = "仓库ID")
    protected Long warehouseId;

    @ApiModelProperty(value = "送货员ID")
    protected String shippingEmployeeId;

    @ApiModelProperty(value = "发货项ID")
    protected Long shippingItemId;

    /**
     *  会员
     */
    @JsonIgnore
    @IgnoreSwaggerParameter
    protected Member member;

    /**
     *  会员
     */
    @JsonIgnore
    @IgnoreSwaggerParameter
    protected Shop shop;

    public String getShopName() {
        Shop shop = getShop();
        if (shop!=null) {
            return shop.getName();
        } else {
            return null;
        }
    }

    public void setShopName(String value) {

    }


    public String getMemberName() {
        Member member = getMember();
        if (member!=null) {
            return member.getName();
        } else {
            return null;
        }
    }

    public void setMemberName(String value) {

    }

    public String getMemberMobile() {
        Member member = getMember();
        if (member!=null) {
            return member.getMobile();
        } else {
            return null;
        }
    }

    public void setMemberMobile(String value) {

    }


}
